package org.ffrl.design.decoration.cd;

import org.ffrl.design.decoration.Beverage;
import org.ffrl.design.decoration.CondimentDecorator;

public class Soy extends CondimentDecorator {
    
    Beverage beverage;
    
    public Soy(Beverage beverage) {
        this.beverage = beverage;
    }
    
    @Override
    public String getDescription() {
        return beverage.getDescription() + ", Soy ";
    }
    
    @Override
    public Double cost() {
        return 0.3 * beverage.size() + beverage.cost();
    }
}
